import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanListHandler;
import org.testng.annotations.Test;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public class Dbutils_user {
    @Test
    public void textQueryMany() throws SQLException {
        Connection connection=Driuid.getconnection();
        QueryRunner queryRunner = new QueryRunner();
        String sql="select * from db_1 where id>=?";
        List<emp> list=queryRunner.query(connection,sql,new BeanListHandler<>(emp.class),1);
        for (emp e:list) {
            System.out.println(e);
        }
        Driuid.close(null,null,connection);
    }
}
